<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-1.12.4.js"></script>
    <script>
        $(() => {
            let adverTop = parseInt($(".adver").css("top"));
            let adverLeft = parseInt($(".adver").css("left"));
            $(window).scroll(function () {
                let scrollTop = parseInt($(this).scrollTop());
                let scrollLeft = parseInt($(this).scrollLeft());
                $('.adver').offset({top: scrollTop + adverTop});
                $('.adver').offset({left: scrollLeft + adverLeft});
            })
        })
    </script>
    <style>
        .main {
            text-align: center;
            width: 1014px;
            margin: 0 auto;
        }

        .adver {
            position: absolute;
            left: 10px;
            top: 30px;
            z-index: 2;
        }
    </style>
</head>
<body>
<div class="adver"><img src="../images/TIM图片20190424224517.jpg"/>
</div>
<div class="main">
    <img src="../images/TIM图片20190424224525.jpg"/>
    <img src="../images/TIM图片20190424224525.jpg"/>
    <img src="../images/TIM图片20190424224525.jpg"/>
</div>

</body>
</html>